package edu.ynu.se.xiecheng.achitectureclass.dao;

import edu.ynu.se.xiecheng.achitectureclass.common.dao.LogicDAO;
import edu.ynu.se.xiecheng.achitectureclass.entity.HumidityData;
import edu.ynu.se.xiecheng.achitectureclass.entity.Device;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Repository
public interface HumidityDataDao extends LogicDAO<HumidityData, Long> {
    HumidityData findTopByDeviceOrderByCreatedTimeDesc(Device device);
    List<HumidityData> findByDeviceAndCreatedTimeBetweenOrderByCreatedTimeDesc(
            Device device, Date startTime, Date endTime);
} 